import QtQuick

Item {
    id: connectParameterBack_ParameterWindow
    width: 1760
    height: 935

    property real fontSize: Cpp_Language.CurrentLanguage === 1 ? 40 : Cpp_Language.CurrentLanguage === 2 ? 25 : Cpp_Language.CurrentLanguage === 3 ? 25 : 40
    property real labelFontSize: Cpp_Language.CurrentLanguage === 1 ? 50 : Cpp_Language.CurrentLanguage === 2 ? 35 : Cpp_Language.CurrentLanguage === 3 ? 35 : 50

    // Rectangle{
    //     anchors.fill: parent
    //     border.width: 1
    //     color: "transparent"
    // }

    // Rectangle{
    //     anchors.fill: parent
    //     border.width: 1
    //     color: "pink"
    // }

    Column{
        anchors.left: connectParameterBack_ParameterWindow.left
        anchors.leftMargin: 30
        anchors.top: connectParameterBack_ParameterWindow.top
        anchors.topMargin: 30

        spacing: 10

        Item{
            width: 500
            height: 80
            // Rectangle{
            //     anchors.fill: parent
            //     border.width: 1
            //     color: "blue"
            // }


            Rectangle{
                width: 200
                height: 80
                anchors.centerIn: parent
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: labelFontSize
                    font.bold: true
                    text: qsTr("PLC连接参数")
                }

            }
        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("端  口")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.plc_Port

                onEditingFinished: function(value){
                    Cpp_Config.plc_Port = value;
                }

            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("波特率")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.plc_Baudrate

                onEditingFinished: function(value){
                    Cpp_Config.plc_Baudrate = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("数据位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.plc_Databit

                onEditingFinished: function(value){
                    Cpp_Config.plc_Databit = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("校验位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.plc_Parity

                onEditingFinished: function(value){
                    Cpp_Config.plc_Parity = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("停止位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.plc_Stopbit

                onEditingFinished: function(value){
                    Cpp_Config.plc_Stopbit = value;
                }
            }

        }



    }
    Column{
        anchors.horizontalCenter: connectParameterBack_ParameterWindow.horizontalCenter
        // anchors.leftMargin: 30
        anchors.top: connectParameterBack_ParameterWindow.top
        anchors.topMargin: 30

        spacing: 10

        Item{
            width: 500
            height: 80
            // Rectangle{
            //     anchors.fill: parent
            //     border.width: 1
            //     color: "blue"
            // }


            Rectangle{
                width: 200
                height: 80
                anchors.centerIn: parent
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: labelFontSize
                    font.bold: true
                    text: qsTr("打印机连接参数")
                }

            }
        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("端  口")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.printer_Port

                onEditingFinished: function(value){
                    Cpp_Config.printer_Port = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("波特率")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.printer_Baudrate

                onEditingFinished: function(value){
                    Cpp_Config.printer_Baudrate = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("数据位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.printer_Databit

                onEditingFinished: function(value){
                    Cpp_Config.printer_Databit = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("校验位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.printer_Parity

                onEditingFinished: function(value){
                    Cpp_Config.printer_Parity = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("停止位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.printer_Stopbit

                onEditingFinished: function(value){
                    Cpp_Config.printer_Stopbit = value;
                }
            }

        }

    }
    Column{
        anchors.right: connectParameterBack_ParameterWindow.right
        anchors.rightMargin: 30
        anchors.top: connectParameterBack_ParameterWindow.top
        anchors.topMargin: 30

        spacing: 10

        Item{
            width: 500
            height: 80
            // Rectangle{
            //     anchors.fill: parent
            //     border.width: 1
            //     color: "blue"
            // }


            Rectangle{
                width: 200
                height: 80
                anchors.centerIn: parent
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: labelFontSize
                    font.bold: true
                    text: qsTr("扫码枪连接参数")
                }

            }
        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("端  口")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.scanner_Port

                onEditingFinished: function(value){
                    Cpp_Config.scanner_Port = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("波特率")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.scanner_Baudrate

                onEditingFinished: function(value){
                    Cpp_Config.scanner_Baudrate = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("数据位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.scanner_Databit

                onEditingFinished: function(value){
                    Cpp_Config.scanner_Databit = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("校验位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.scanner_Parity

                onEditingFinished: function(value){
                    Cpp_Config.scanner_Parity = value;
                }
            }

        }
        Item{
            width: 500
            height: 80

            Rectangle{
                width: 200
                height: 60
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 20
                color: "transparent"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: fontSize
                    font.bold: true
                    text: qsTr("停止位")
                }

            }

            A_Textinput{
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 230
                inputWidth: 270
                inputHeight: 80
                text: Cpp_Config.scanner_Stopbit

                onEditingFinished: function(value){
                    Cpp_Config.scanner_Stopbit = value;
                }
            }

        }


    }

}
